package com.binance.assetservice.api;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import com.binance.assetservice.vo.request.GetTranRequest;
import com.binance.master.configs.FeignConfig;
import com.binance.master.constant.Constant;
import com.binance.master.models.APIRequest;
import com.binance.master.models.APIResponse;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@Api
@FeignClient(name = Constant.ASSET_SERVICE, configuration = FeignConfig.class)
public interface ITranApi {

    @ApiOperation(notes = "获取tranId", nickname = "getTranId", value = "获取tranId")
    @PostMapping(value = "/tran/getTranId", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public APIResponse<Long> getTranId(@RequestBody @Validated APIRequest<GetTranRequest> request) throws Exception;
}
